﻿<UserControl x:Class="Gao.Poker.App.Members.MemberEdit"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" d:DesignWidth="482" FontSize="15">
    <Grid Margin="5" Height="517" Width="479" HorizontalAlignment="Stretch">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="90"/>
            <ColumnDefinition Width="350"/>
            <ColumnDefinition Width="32*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="5"/>
            <RowDefinition Height="30" />
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="98"/>
            <RowDefinition Height="50"/>
            <RowDefinition Height="32*" />
        </Grid.RowDefinitions>
        
        <TextBlock Text="卡号：" Margin="1" Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Right" FontSize="15" />
        <TextBox Text="{Binding Path=Member.CardNo}" Margin="1,1,0,1" Grid.Column="1" VerticalContentAlignment="Center" FontSize="15" Width="250" HorizontalAlignment="Left" FontWeight="Bold" />

        <TextBlock Text="姓名："  Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right" FontSize="15" />
        <TextBox Text="{Binding Path=Member.Name}" Margin="1" VerticalContentAlignment="Center"  Grid.Column="1" Grid.Row="1" FontSize="15" Width="100" HorizontalAlignment="Left" FontWeight="Bold" />

        <TextBlock Text="生日：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="2" FontSize="15" />
        <DatePicker Margin="1,1,99,1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="2" DisplayDate="{Binding Member.Birthday}" SelectedDate="{Binding Member.Birthday}" FontSize="15" FontWeight="Bold" />

        <TextBlock Text="电话：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="3" FontSize="15" />
        <TextBox Text="{Binding Member.Telephone}" Margin="1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="3" FontSize="15" Width="250" HorizontalAlignment="Left" FontWeight="Bold" />

        <TextBlock Text="E-Mail：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="4" FontSize="15" />
        <TextBox Text="{Binding Member.Email}" Margin="1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="4" FontSize="15" Width="250" HorizontalAlignment="Left" FontWeight="Bold" />

        <TextBlock Text="消费金额：" HorizontalAlignment="Right" Margin="0,10,9,12" VerticalAlignment="Center" Grid.Row="5" Width="68" FontSize="15" />
        <TextBox Text="{Binding Member.ConsumeMoney}" Margin="1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="5" FontSize="15" Width="100" HorizontalAlignment="Left" FontWeight="Bold" />

        <TextBlock Text="积分：" HorizontalAlignment="Right" Margin="0,4,1,9" VerticalAlignment="Center" Grid.Row="7" FontSize="15" />
        <TextBox Text="{Binding Member.Points}" Margin="1,1,0,1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="6" FontSize="15" Width="100" HorizontalAlignment="Left" FontWeight="Bold" Grid.RowSpan="2" />

        <TextBlock Text="地址：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Row="8" FontSize="15" />
        <TextBox Text="{Binding Member.Address}" Margin="1,1,0,1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="8" FontSize="15" FontWeight="Bold" Grid.ColumnSpan="2" />

        <TextBlock Text="身份证：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Row="9" FontSize="15" />
        <TextBox Text="{Binding Member.IdNo}" Margin="1,1,0,1" VerticalContentAlignment="Center" Grid.Column="1" Grid.Row="9" FontSize="15" FontWeight="Bold" Grid.ColumnSpan="2" />

        <TextBlock Text="开卡时间：" HorizontalAlignment="Right" Margin="0,9,1,11" VerticalAlignment="Center" Grid.Row="10" FontSize="15" />
        <TextBlock Text="{Binding Member.OpenCardDate, StringFormat='yyyy-MM-dd hh:mm:ss'}"  VerticalAlignment="Center"  Margin="1" Grid.Column="1" Grid.Row="10" FontSize="14" FontWeight="Bold" />

        <TextBlock Text="备注：" HorizontalAlignment="Right" Margin="1" Grid.Row="11" FontSize="15" />
        <TextBox Text="{Binding Member.Remark, Mode=TwoWay}" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" Margin="1,1,23,0" VerticalAlignment="Top" Grid.Column="1" Grid.Row="11" Height="98" FontSize="15" FontWeight="Bold" Grid.ColumnSpan="2" Grid.RowSpan="2" />

        <StackPanel Orientation="Horizontal" Grid.Row="12" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="1">
            <Button Padding="5" Style="{DynamicResource Orrange}" Width="60" FontSize="16" Height="35" Command="{Binding SaveCommand}" CommandParameter="{Binding Member}" >保存</Button>
            <Button Padding="5" Margin="10,0,0,0" Style="{DynamicResource Orrange}" Width="60" FontSize="16" Height="35" Command="{Binding CancelCommand}" CommandParameter="{Binding Member}" >取消</Button>
        </StackPanel>
        
    </Grid>
</UserControl>
